﻿<%@ Page Title="" Language="VB" MasterPageFile="~/KYC/MasterPageKYC.master" AutoEventWireup="false" CodeFile="ApproveHistory.aspx.vb" Inherits="KYC_ApproveHistory" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <style type="text/css">
        .style1
        {
            width: 200px;
            text-align: right;
        }
    .style2
    {
        width: 184px;
    }
    .style3
    {
        width: 78px;
    }
    </style>

<script type="text/javascript">

    $(function () {
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);

        $("#ContentPlaceHolder1_txtDateStart").datepicker($.extend({}, $.datepicker.regional['th'], {
            yearAddToDisplay: 543,
            dateFormat: 'dd/mm/yy',
            showOn: "button",
            buttonImage: "../img/calendar.gif",
            buttonImageOnly: true
        }));
        $("#ContentPlaceHolder1_txtDateEnd").datepicker($.extend({}, $.datepicker.regional['th'], {
            yearAddToDisplay: 543,
            dateFormat: 'dd/mm/yy',
            showOn: "button",
            buttonImage: "../img/calendar.gif",
            buttonImageOnly: true
        }));

        function EndRequestHandler(sender, args) {

            $("#ContentPlaceHolder1_txtDateStart").datepicker($.extend({}, $.datepicker.regional['th'], {
                yearAddToDisplay: 543,
                dateFormat: 'dd/mm/yy',
                showOn: "button",
                buttonImage: "../img/calendar.gif",
                buttonImageOnly: true
            }));
            $("#ContentPlaceHolder1_txtDateEnd").datepicker($.extend({}, $.datepicker.regional['th'], {
                yearAddToDisplay: 543,
                dateFormat: 'dd/mm/yy',
                showOn: "button",
                buttonImage: "../img/calendar.gif",
                buttonImageOnly: true
            }));

        }

    })

    var hasSubmitted = 0;
    function NoDoubleSubmit() {
        var divMsg = document.getElementById('Processing');
        if (hasSubmitted == 0) {
            hasSubmitted = 0;
            divMsg.style.display = 'block';
            return true;
        }
        return false;
    }

    var prm = Sys.WebForms.PageRequestManager.getInstance();

    prm.add_initializeRequest(InitializeRequest);
    prm.add_endRequest(EndRequest);

    function InitializeRequest(sender, args) {
        $get('ContentPlaceHolder1_UpdatePanel1').style.cursor = 'wait';
    }

    function EndRequest(sender, args) {
        $get('ContentPlaceHolder1_UpdatePanel1').style.cursor = 'auto';
    }

</script>
  <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>

<table style="width:100%;" class="control">
            <tr>
                <td class="style1">
                    ประเภทลูกค้า : </td>
                <td class="style2">
                    <asp:DropDownList ID="ddlType" runat="server" CssClass="control" Width="150px">
                        <asp:ListItem></asp:ListItem>
                        <asp:ListItem Value="1">บุคคลธรรมดา</asp:ListItem>
                        <asp:ListItem Value="2">นิติบุคคล</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td class="style3">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style1">
                    ช่วงวันที่อนุมัติ :</td>
                <td class="style2">
                    <asp:TextBox ID="txtDateStart" runat="server" CssClass="control" Width="150px"></asp:TextBox>
                </td>
                <td class="style3">
                    ถึงวันที่
                </td>
                <td>
                    <asp:TextBox ID="txtDateEnd" runat="server" CssClass="control" Width="150px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    &nbsp;</td>
                <td class="style2">
                    &nbsp;</td>
                <td class="style3">
                    &nbsp;</td>
                <td style="text-align: right">
                    <asp:Button ID="btnSearch" runat="server" CssClass="control" Text="ค้นหา" 
                        Width="64px" />
                    <asp:Button ID="btnPrint" runat="server" CssClass="control" Text="พิมพ์" 
                        Width="64px" />
                </td>
            </tr>
            <tr>
                <td class="style1">
                    &nbsp;</td>
                <td style="text-align: right" class="style2">
                    &nbsp;</td>
                <td style="text-align: right" class="style3">
                    &nbsp;</td>
                <td style="text-align: right">
                    &nbsp;</td>
            </tr>
        </table>
    <div align="right" style="text-align: center">
                <asp:Label ID="lblMsg" runat="server" ForeColor="Red" Text="ไม่พบข้อมูล" 
                        Font-Bold="True" Font-Size="30px" Height="30px" Visible="False"></asp:Label>
             <SPAN id="Processing" style="DISPLAY: none">
 <img src="../img/icon/ajax-loader.gif" alt="Please wait" />
            กรุณารอสักครู่ ระบบกำลังค้นหาข้อมูล...
  </SPAN>
                    <asp:GridView ID="grdIndividual" runat="server" CellPadding="4" 
                        ForeColor="#333333" AutoGenerateColumns="False" Width="100%" 
                        AllowPaging="True" CssClass="control">
                        <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                        <Columns>
                            <asp:TemplateField HeaderText="วันที่">
                            <ItemTemplate>
                                 <asp:Label ID="lblUpdateDate" runat="server" 
                                     Text='<%# Eval("UPDATEDATE") %>'></asp:Label>
                                 </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" Width="60px" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="ประเมินโดย">
                                <ItemTemplate>
                                    <asp:Label ID="lblUpdateBy" runat="server" Text='<%# Eval("UPDATEBY") %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" Width="50px" />
                            </asp:TemplateField>
                            <asp:BoundField HeaderText="เลขประจำตัวลูกค้า" DataField="CUSTCODE" >
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemStyle Width="80px" />
                            </asp:BoundField>
                            <asp:BoundField HeaderText="เลขที่บัตรประชาชน/หนังสือเดินทาง" DataField="UNIQUEID" >
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemStyle Width="100px" />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="ชื่อลูกค้า (ไทย)">
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                 <asp:Label ID="lblTHName" runat="server" 
                                      
                                     Text='<%# Eval("THFIRSTNAME") & "  " & Eval("THMIDNAME") & "  " & Eval("THLASTNAME") %>'></asp:Label>
                                 </ItemTemplate>
                            <ItemStyle HorizontalAlign="Left" Width="18%" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="ชื่อลูกค้า (อังกฤษ)">
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                 <asp:Label ID="lblENName" runat="server" 
                                      
                                     Text='<%# Eval("ENFIRSTNAME") & "  " & Eval("ENMIDNAME") & "  " & Eval("ENLASTNAME") %>'></asp:Label>
                                 </ItemTemplate>
                            <ItemStyle HorizontalAlign="Left" Width="18%" />
                            </asp:TemplateField>
                            <asp:BoundField HeaderText="ระดับ" 
                                DataField="AMLCDD" >
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemStyle Width="10px" HorizontalAlign="Center" />
                            </asp:BoundField>
                            <asp:BoundField DataField="AMLREASON" HeaderText="เหตุผล" > 
                            <ItemStyle HorizontalAlign="Left" />
                            </asp:BoundField>
                            <asp:BoundField DataField="APPROVESTATUS" HeaderText="สถานะ" > 
                            <ItemStyle HorizontalAlign="Left" />
                            </asp:BoundField>
                        </Columns>
                        <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                        <PagerSettings Mode="NumericFirstLast" />
                        <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" 
                    CssClass="cssPager" />
                        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                        <HeaderStyle BackColor="#FF9933" Font-Bold="True" ForeColor="White" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>
             
                    <div align="left">
                    <asp:GridView ID="grdNonIndividual" runat="server" CellPadding="4" 
                        ForeColor="#333333" AutoGenerateColumns="False" Width="100%" 
                        AllowPaging="True" CssClass="control">
                        <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                        <Columns>
                            <asp:TemplateField HeaderText="วันที่">
                            <ItemTemplate>
                                 <asp:Label ID="lblUpdateDate" runat="server" 
                                     Text='<%# Eval("UPDATEDATE") %>'></asp:Label>
                                 </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" Width="60px" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="ประเมินโดย">
                                <ItemTemplate>
                                    <asp:Label ID="lblUpdateBy" runat="server" Text='<%# Eval("UPDATEBY") %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" Width="50px" />
                            </asp:TemplateField>
                            <asp:BoundField HeaderText="เลขประจำตัวลูกค้า" DataField="CUSTCODE" >
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemStyle Width="80px" />
                            </asp:BoundField>
                            <asp:BoundField HeaderText="เลขทะเบียนนิติบุคคล" DataField="UNIQUEID" >
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemStyle Width="100px" />
                            </asp:BoundField>
                            <asp:BoundField HeaderText="ชื่อลูกค้า (ไทย)" DataField="THFIRSTNAME" >
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemStyle HorizontalAlign="Left" Width="18%" />
                            </asp:BoundField>
                            <asp:BoundField HeaderText="ชื่อลูกค้า (อังกฤษ)" DataField="ENFIRSTNAME" >
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemStyle HorizontalAlign="Left" Width="18%" />
                            </asp:BoundField>
                            <asp:BoundField HeaderText="ระดับ" 
                                DataField="AMLCDDOVERVIEW" >
                            <ItemStyle Width="10px" HorizontalAlign="Center" />
                            </asp:BoundField>
                            <asp:BoundField DataField="AMLREASONOVERVIEW" HeaderText="เหตุผล" > 
                            <ItemStyle HorizontalAlign="Left" />
                            </asp:BoundField>
                             <asp:BoundField DataField="APPROVESTATUS" HeaderText="สถานะ" > 
                            <ItemStyle HorizontalAlign="Left" />
                            </asp:BoundField>
                        </Columns>
                        <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                        <PagerSettings Mode="NumericFirstLast" />
                        <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" 
                    CssClass="cssPager" />
                        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                        <HeaderStyle BackColor="#FF9933" Font-Bold="True" ForeColor="White" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>
              <div align="right">
                   <asp:Label ID="lblTotal" runat="server" Font-Bold="True" ForeColor="#003300"></asp:Label>
             </div>
</div>
</div>

    </ContentTemplate>
</asp:UpdatePanel>
</asp:Content>

